package com.atguigu.tingshu.user.test;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

@Component
public class B {
//    @Autowired
//    A a;
    private A a;
    @Autowired
    @Lazy
    public void setA(A a){
        this.a = a;
    }

//    public B(A a){
//        this.a = a;
//    }

    public A getA(){
        return a;
    }
}
